﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EmptyASP.View
{
    public partial class imagePreview : System.Web.UI.UserControl
    {
        private String _imageURL="";
        private String _imageFilename = "";
        public String imageURL
        {
            get { return _imageURL; }
            set { _imageURL = value; imagePanel.BackImageUrl = value; URL.Text = value; }
        }
        public String imageFilename
        {
            get { return _imageFilename; }
            set { _imageFilename = value;
                if (value.Length >= 20)
                {
                    value = Path.GetFileNameWithoutExtension(value).Substring(0, 14) + "(...)" + Path.GetExtension(value);
                }
                Filename.Text = value; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}